<!-- test.html -->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
        <title>获取图片的base64编码</title>
    </head>
    <body>
        <input type="file" name="file" id="inputBox">
        <script src="./test.js"></script>
    </body>
</html>